1. Field of the Invention
The present application relates generally to information handling and more particularly to a computer implemented method, apparatus, and computer usable program code for detecting a lack of forward process in an instruction stream and serializing micro-operation execution.
2. Description of the Related Art
Data processing systems are used by increasing numbers of businesses and individuals each year. These data processing systems help users to efficiently process data and information. To a large extent, the efficiency of the data processing system relies on processing instructions as fast as possible. The escalating complexity of microprocessors and the real-time interaction of multiple instructions make it difficult to guarantee that an instruction stream makes forward progress in all situations. Forward progress indicates that instructions are generally moving forward and are being executed. Forward progress may be quantified by a user specified threshold such as cycles, flushes, passage of time, or other system indicators.
Guaranteeing instruction stream progress is especially difficult when multiple threads are present. Difficulties also arise when parts of the architected instruction set must be translated to microcode routines, and the microcode routines are not re-entrant. A microcode routine or a microcode program implements a central processing unit instruction set. Just as a single high level language statement is compiled to a series of machine instructions, each machine instruction is in turn implemented by a series of micro-instructions or micro-operations, sometimes called microcode. On most computers the microcode is not produced by a compiler, but exists in a special high speed memory. Microcode routines are often used to correct bugs in the instruction set, to implement new machine instructions, or more commonly to maintain compatibility with previous microprocessors. Often, when an instruction set architecture is maintained over several generations of microprocessors, instructions that were efficiently implemented in hardware in a previous generation may not map efficiently on newer generation microprocessors that take advantage of superscalar or superpipelining techniques. Microcode may also allow one computer microarchitecture to emulate another, usually more-complex architecture. A microcode routine that is not re-entrant means that if a microcode instruction in the routine is flushed, the routine must be restarted from the beginning.
In some cases, because of dependencies, errors, conflicts, or other glitches, a microcode routine may be flushed multiple times before the microcode routine is completed. Each time the microcode routine is flushed, processing resources have been wasted and the process must be restarted anew. In other cases, the microcode routine may become permanently stalled in the instruction stream stalling the progress of the instruction stream and consuming processing resources.